import request from '@/views/utils/request'

// 获取计费规则列表
export function getCarRuleList(params) {
  return request({
    url: 'parking/rule/list',
    params
  })
}
// 获取计费规则详情
export function getCarRuleDetail(id) {
  return request({
    url: `parking/rule/${id}`,
    method: 'get'
  })
}
// 删除计费规则
export function deleteCarRule(id) {
  return request({
    url: `parking/rule/${id}`,
    method: 'delete'
  })
}

// 添加计费规则
export function addCarRule(data) {
  return request({
    url: 'parking/rule',
    method: 'post',
    data
  })
}
// 编辑计费规则
export function editCarRule(data) {
  return request({
    url: 'parking/rule',
    method: 'put',
    data
  })
}
